package com.szrt.java.day20161229.demo02;


//  Car  String brand, double price, double weight;  this.salary =salary;
public class Teacher {
	
	int age;
	int salary;
	
	public void setAge(int age2){
		age =age2;
	}
	
	public int getAge(){
		return age;
	}
	
	public void setSalary(int salary){
		// this 要写在前面  代表访问当前这个类的对象的某个属性
		this.salary =salary;
	}
	
	public int getSalary(){
		return salary;
	}

	public static void main(String[] args) {
		
		Teacher teacher = new Teacher();
		teacher.setAge(33);
		teacher.setSalary(22000);
		
		int aa = teacher.getAge();
		int bb = teacher.getSalary();
		
		System.out.println(aa + " : " + bb);
		
		

	}

}
